Ext.define('ZO0.view.ItemsOnGoogle', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.itemsongoogle',

    title: 'Items On Google',
    store: 'ItemsOnGoogle',

    frame: true,
    columnLines: true,

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            height: 600,
            viewConfig: { stripeRows: true },
            columns: [
                { xtype: 'gridcolumn', header: 'Accware ID', dataIndex: 'accwareID', width: 100, align: 'center', sortable: true },
                { xtype: 'gridcolumn', header: 'Item Name', dataIndex: 'name', width: 300, align: 'left', sortable: false },
                { xtype: 'gridcolumn', header: 'Sell Price', dataIndex: 'sellPrice', width: 100, align: 'right', sortable: false, renderer: 'usMoney' },
                { xtype: 'gridcolumn', header: 'Res Price', dataIndex: 'reslPrice', width: 100, align: 'right', sortable: false, renderer: 'usMoney' },
                { xtype: 'gridcolumn', header: 'Mfr Name', dataIndex: 'mfrName', width: 100, align: 'center', sortable: false },
                { xtype: 'gridcolumn', header: 'Mfr Number', dataIndex: 'mfrNumber', width: 120, align: 'center', sortable: false },
                { xtype: 'gridcolumn', header: 'Weight', dataIndex: 'weight', width: 80, align: 'right', sortable: false, renderer: Ext.util.Format.numberRenderer('0.00') },
                { xtype: 'gridcolumn', header: 'Cond', dataIndex: 'cond', width: 100, align: 'center', sortable: false },
                { xtype: 'gridcolumn', header: 'Cat Name', dataIndex: 'catName', width: 200, align: 'left', sortable: false }
            ],
            dockedItems: [{
                xtype: 'pagingtoolbar',
                store: 'ItemsOnGoogle',
                dock: 'bottom',
                displayInfo: true
            }],
            listeners: {
                render: function(grid) {
                    grid.getStore().load();
                }
            }
        });
        me.callParent(arguments);
    }
});
